package com.hzzc.core.model;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;

import java.io.Serializable;


@javax.persistence.Table(name = "sso_resource")
@com.gitee.sunchenbin.mybatis.actable.annotation.Table(name = "sso_resource")
public class SSOResource extends AutoIncrementEntity implements Serializable {

    /**
     * 名字
     */
    @Column(name = "name", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String name;

    /**
     * 资源定位符
     */
    @Column(name = "code", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String code;


    /**
     * 资源定位符
     */
    @Column(name = "locator", type = MySqlTypeConstant.VARCHAR, length = 200)
    private String locator;

    /**
     * 描述
     */
    @Column(name = "msg", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String msg;

    /**
     * 系统Id
     */
    @Column(name = "application_id", type = MySqlTypeConstant.BIGINT)
    private Long applicationId;

    /**
     * 父级资源Id
     */
    @Column(name = "parent_resource_id", type = MySqlTypeConstant.BIGINT, defaultValue = "0")
    private Long parentResourceId = 0L;

    /**
     * 是否是操作的标记
     */
    @Column(name = "action_flag", type = MySqlTypeConstant.BIT)
    private Boolean actionFlag = false;

    public String getCode() {
        return code;
    }

    public SSOResource setCode(String code) {
        this.code = code;
        return this;
    }

    public SSOResource setActionFlag(Boolean actionFlag) {
        this.actionFlag = actionFlag;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public SSOResource setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Long getParentResourceId() {
        return parentResourceId;
    }

    public SSOResource setParentResourceId(Long parentResourceId) {
        this.parentResourceId = parentResourceId;
        return this;
    }

    public String getName() {
        return name;
    }

    public SSOResource setName(String name) {
        this.name = name;
        return this;
    }

    public String getLocator() {
        return locator;
    }

    public SSOResource setLocator(String locator) {
        this.locator = locator;
        return this;
    }

    public Long getApplicationId() {
        return applicationId;
    }

    public SSOResource setApplicationId(Long applicationId) {
        this.applicationId = applicationId;
        return this;
    }

    public Boolean getActionFlag() {
        return actionFlag;
    }

    public SSOResource setActionFlag(boolean actionFlag) {
        this.actionFlag = actionFlag;
        return this;
    }
}
